<template>
<view>
    <view v-for="item in supermarket" :key="item._id" @click="handleClick(item._id)">
        <view class="remen" >
					<image class="superimg" :src="item.imgUrl"></image>
					<view class="superxinxi">
						<view style="font-weight:600;">
							{{item.name}}
						</view>
						<view>月送：{{item.sales}}&nbsp;&nbsp;&nbsp;起送：{{item.expressLimit}}&nbsp;&nbsp;&nbsp;基础运费：{{item.expressPrice}}</view>
						<view style="color:red;">{{item.slogan}}</view>
						</view>
				</view>
			</view>
</view>
    
</template>
<script>
	import  config  from '@/config'
	export default {
		data() {
			return {
				supermarket:[]
			}
		},
		onLoad() {
			this.show();
		},
		methods: {
			show(){
				uni.request({
					url: config.API_HOST+'/hotList',
					success: (res) => {
						this.supermarket=res.data
					}
				});
			},
			handleClick(id) {
            console.log('点击的商品 id 是:', id);
            uni.navigateTo({
                url: `/pages/super/index?id=${id}`
            });
        }
		}
	}
</script>
<style scoped>
.fujindianpu{
		width: 90%;
		height: 80rpx;
		line-height: 80rpx;
		margin: 10px auto;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		border-bottom: 1px solid #ccc;
	}
	.remen{
		width: 90%;
		margin: 10px auto;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}
	.superxinxi{
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.superimg{
		width: 150rpx;
		height: 150rpx;
	}
	
</style>
				